/*
 * @Author: qianmingtian
 * @Date: 2020-07-09 22:13:30
 * @LastEditors: qianmingtian
 * @LastEditTime: 2020-07-10 09:06:25
 * @FilePath: \qianmingtian.github.io\code\java\StringBufferBuilder\StringBufferTest01.java
 */
package StringBufferBuilder;

import java.math.BigDecimal;

/**
 * java 字符串不可变，字符串拼接时，每一次拼接都会产生新的字符串
 */
public class StringBufferTest01 {
    public static void main(String[] args) {
        String s = "";
        // 会给方法区带来空间压力
        for (int i = 0; i < 100; i++) {
            s = s + i;
        }

        StringBuffer sb = new StringBuffer();
        sb.append("asdsa");
        StringBuffer sbs = new StringBuffer(34);
        sbs.append("safdgfdshsdf");
        
        Integer i= new Integer(2);
        System.out.println(Integer.parseInt("123"));
        System.out.println(Integer.bitCount(5));;
        
        BigDecimal bd = new BigDecimal(1234.1);
        bd = bd.multiply(bd);
    
        

    }

    
}/*
  * @Author: qianmingtian
  * 
  * @Date: 2020-07-09 22:13:30
  * 
  * @LastEditors: qianmingtian
  * 
  * @LastEditTime: 2020-07-09 22:13:30
  * 
  * @FilePath:
  * \qianmingtian.github.io\code\java\StringBufferBuilder\StringBufferTest01.java
  */
